#!/sbin/openrc-run

: ${cfgfile:="/etc/rsyncd.conf"}

command="/usr/bin/rsync"
command_args="--daemon --no-detach --config=$cfgfile
	$command_args $RSYNC_OPTS"  # RSYNC_OPTS is here for backward compatibility
command_background="yes"

pidfile="/run/$RC_SVCNAME.pid"
required_files="$cfgfile"

depend() {
	use net
	after firewall
}
